package com.cmlite.model;

import java.util.Comparator;

public class EventModel implements Comparator<String> {
	/**
	 * NSString *eventID; NSString *eventName; NSString *eventOrt;
	 */
	private String eventId;
	private String eventName;
	private String eventOrt;
	private boolean isGroup = false;
	private boolean isColor = true;
	private boolean isSelected = false;
	
	public boolean isSelected() {
		return isSelected;
	}

	public void setSelected(boolean isSelected) {
		this.isSelected = isSelected;
	}

	public boolean isColor() {
		return isColor;
	}

	public void setColor(boolean isColor) {
		this.isColor = isColor;
	}

	@Override
	public String toString() {
		return "EventModel [eventId=" + eventId + ", eventName=" + eventName
				+ ", eventOrt=" + eventOrt + ", isGroup=" + isGroup
				+ ", isColor=" + isColor + "]";
	}

	/**
	 * @return the eventId
	 */
	public String getEventId() {
		return eventId;
	}

	/**
	 * @param eventId
	 *            the eventId to set
	 */
	public void setEventId(String eventId) {
		this.eventId = eventId;
	}

	/**
	 * @return the eventName
	 */
	public String getEventName() {
		return eventName;
	}

	/**
	 * @param eventName
	 *            the eventName to set
	 */
	public void setEventName(String eventName) {
		this.eventName = eventName;
	}

	/**
	 * @return the eventOrt
	 */
	public String getEventOrt() {
		return eventOrt;
	}

	/**
	 * @param eventOrt
	 *            the eventOrt to set
	 */
	public void setEventOrt(String eventOrt) {
		this.eventOrt = eventOrt;
	}

	public boolean isGroup() {
		return isGroup;
	}

	public void setGroup(boolean isGroup) {
		this.isGroup = isGroup;
	}

	@Override
	public int compare(String lhs, String rhs) {
		// TODO Auto-generated method stub
		if (lhs.equals(rhs))
			return 0;
		return 1;
	}

	public String getValueByIndex(int index) {
		switch (index) {
		case 1: {
			if (eventName.equals("")) {
				return "#";
			}
			return eventName;
		}
		}
		return eventId;
	}

}
